package main

import (
	"log"
	"net/http"
	"study/go-blog/common"
	"study/go-blog/router"
)

// init 方法先于main方法被执行
func init() {
	//模板加载
	common.LoadTemplate()
}

func main() {

	server := http.Server{
		Addr: "127.0.0.1:8080",
	}

	router.Router()

	if err := server.ListenAndServe(); err != nil {
		log.Println(err)
	}

}
